package com.ll.wechat.chat.activity;

import java.util.ArrayList;

import android.text.Editable;
import android.text.TextWatcher;
import android.widget.EditText;
import android.widget.ListView;

import com.ll.wechat.R;
import com.ll.wechat.base.activity.BaseActivity;
import com.ll.wechat.base.utils.widget.TextWatcherAdapter.TextWatcherListener;
import com.ll.wechat.chat.ChatMessage;
import com.ll.wechat.chat.adapter.ChatViewListAdapter;
import com.ll.wechat.chat.widget.ChatEditext;

/**
 * 聊天界面
 * 
 * @ClassName: ChatActivity
 * @author yeliangliang
 * @date 2015-7-29 下午5:56:28
 */
public class ChatActivity extends BaseActivity implements TextWatcherListener{
	private ArrayList<ChatMessage> chatMessageList;// 聊天信息集合
	private ListView chatListView;// 聊天信息列表
	private ChatViewListAdapter mAdapter;// 聊天信息列表适配器
	private ChatEditext edt_input;// 输入框

	@Override
	public void initView() {
		setContentView(R.layout.activity_chat);
		chatListView = (ListView) findViewById(R.id.listView_chat);
		edt_input = (ChatEditext) findViewById(R.id.edt_input);
	}

	@Override
	public void initData() {
		chatMessageList = new ArrayList<ChatMessage>();
		mAdapter = new ChatViewListAdapter(ChatActivity.this, chatMessageList);
		chatListView.setAdapter(mAdapter);
		mAdapter.notifyDataSetChanged();
	}

	@Override
	public void onTextChanged(EditText view, String text) {
		// TODO Auto-generated method stub
		
	}

}
